
const applyStatus = [
    {label:'已申请',value:'0',type:'primary'},
    {label:'同意',value:'1',type:'success'},
    {label:'拒绝',value:'2',type:'danger'},
	{label:'已入住',value:'3',type:'success'},
    {label:'已超期',value:'4',type:'danger'},
    {label:'撤销申请',value:'-1',type:'info'},
]
const empowerstatus = [
    {label:'未发起',value:'1',type:'primary'},
    {label:'已获得授权',value:'2',type:'success'},
    {label:'未获得授权',value:'3',type:'warning'},
    {label:'拒绝',value:'4',type:'danger'},
]
const yesOrNo = [
    {label:'有',value:'1',type:'success'},
    {label:'无',value:'0',type:'danger'},
]
const tableConfig = {
	stripe: true,
	border: true,
	maxHeight: '80vh',
	columns: [
		{
			label: '编号',
			prop: 'reservationCode',
		},
		{
			label: '申请时间',
			prop: 'reservationTime',
		},
		{
			label: '机构名称',
			prop: 'orgName',
		},
		{
			label: '老人',
			prop: 'oldMan',
		},
		{
			label: '身份证',
			prop: 'idCard',
		},
		{
			label: '联系电话',
			prop: 'phone',
		},
		{
			label: '申请状态',
			prop: 'reservationState',
            // propName:'reservationStateLabel',
            type:"select",
            custome:'tag',
            dicData:applyStatus
		},
		{
			label: '取消原因',
			prop: 'reason',
		},
		{
			label: '有无历史入住记录',
			prop: 'isChecked',
            custome:'tag',
            dicData:yesOrNo
		},
		{
			label: '有无档案',
			prop: 'hasDocument',
            custome:'tag',
            dicData:yesOrNo
		},
		{
			label: '档案获得授权状态',
			prop: 'empowerState',
            // propName:'empowerStateLabel',
            type:"select",
            custome:'tag',
            dicData:empowerstatus
		},
		{
			label: '操作',
			prop: 'menu',
			width: 300,
			fixed: 'right',
		},
	],
}
const searchConfig = {
	inline: true,
	showBtn: true,
	labelPosition: 'left',
	column: [
		{
			label: '申请时间',
			prop: 'informKey',
			type:'input',
			span: 8,
		},
		{
			label: '机构名称',
			prop: 'orgName',
			span: 8,
		},
		{
			label: '老人',
			prop: 'oldMan',
			type:'input',
			span: 8,
		},
		{
			label: '申请状态',
			prop: 'reservationState',
			type:"select",
            dicData:applyStatus,
			span: 8,
		},
		{
			label: '有无历史入住信息',
			prop: 'isChecked',
            type:'select',
            dicData:yesOrNo,
			span: 8,
		},
		{
			label: '有无档案',
			prop: 'hasDocument',
			type:'select',
            dicData:yesOrNo,
			span: 8,
		},
		{
			label: '档案获得授权状态',
			prop: 'empowerState',
			type:"select",
            dicData:empowerstatus,
			span: 8,
		},
	],
}
export const baseConfig: any = {
	pageName: '预约入住申请',
	addLabel: '添加',
	rowKey: 'id',
	tipLabel: 'reservationCode',
	api: {
		index: 'view_bscServiceOrgReservation_page',
		detail:'view_bscServiceOrgReservation_view',
		edit: 'view_bscServiceOrgReservation_edit',
		delete: 'view_bscServiceOrgReservation_del',
	},
	auth: {
		index: 'view_bscServiceOrgReservation_page',
		edit: 'view_bscServiceOrgReservation_edit',
		detail:'view_bscServiceOrgReservation_view',
		delete: 'view_bscServiceOrgReservation_del',
	},

	menuBtn: [
		{
			icon: 'detail',
			label: '详情',
			type: 'primary',
			operate: 'Detail',
			auth: '',
			text: true,
			show: true,
		},
	],
	dialogConfig: {
		width: '65%',
	},
	searchConfig,
	tableConfig,
}
